package org.dev.hi.item

import android.view.View
import android.widget.ImageView
import androidx.recyclerview.widget.RecyclerView
import org.dev.hi.R
import org.dev.hi.hiui.item.HiDataItem

/**
 * Author WenPing
 * CreateTime 2021/4/22.
 * Description:
 */
open class GridDataItem(data: ItemData) : HiDataItem<ItemData,GridDataItem.GridViewHolder>(data) {

    override fun getItemLayoutRes(): Int = R.layout.layout_list_item_grid

    class GridViewHolder(view: View):RecyclerView.ViewHolder(view){
        var imageView: ImageView? = null;

        init {
           imageView =  view.findViewById<ImageView>(R.id.item_image)
        }

    }

    override fun onBindData(vh: GridViewHolder, position: Int) {
        vh.imageView!!.setImageResource(R.drawable.fire)
    }


}